#include "BlockTemplate.h"
#include "Types.h"

BlockTemplate::BlockTemplate(int nID, TextureIndex textureIndex)
{
	m_nBlockID = nID;
	m_textureIndices = textureIndex;
}
BlockTemplate::BlockTemplate(int nID, uint textureName, int textureIndex)
{
	m_nBlockID = nID;
	m_textureIndices.SetTexture(textureName);
	for(int i = 0; i < SIDE_COUNT; i++)
		m_textureIndices[i] = textureIndex;
}
BlockTemplate::~BlockTemplate(void)
{
}
uint BlockTemplate::GetRenderType()
{
	return RENDERTYPE_BLOCK;
}
const vector2 &BlockTemplate::GetTextureUV(uint side) const
{
	return m_textureIndices.GetUV(side);
}
uint BlockTemplate::GetTextureSubIndex(uint side)
{
	return m_textureIndices[side];
}
uint BlockTemplate::GetID()
{
	return m_nBlockID;
}
uint BlockTemplate::GetTextureName()
{
	return m_textureIndices.GetTextureName();
}
int BlockTemplate::OnRightClick()
{
	return 0;
}
int BlockTemplate::OnLeftClick()
{
	return 0;
}
ItemStack BlockTemplate::OnItemize()
{
	//NYI
	return ItemStack();
}
MultiTextureIndex &BlockTemplate::GetTextureIndex()
{
	return m_textureIndices;
}
string BlockTemplate::GetInternalBlockName()
{
	return "";
}